package com.haobao.telephonerecord;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.os.Environment;

import com.haobao.telephonerecord.utils.FileUtils;

import java.io.File;
import java.util.ArrayList;
import java.util.Vector;

public class SecondActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);


        String path = Environment.getExternalStorageDirectory().toString() + "/MIUI/sound_recorder/call_rec/";
        System.out.println(".onCreate path=" + path);
/*
        Vector<File> allFiles = FileUtils.getAllFiles(path);


        for (File file : allFiles) {
            String name = file.getName();
            System.out.println(".onCreate name=" + name);
            String absolutePath = file.getAbsolutePath();
            System.out.println(".onCreate absolutePath=" + absolutePath);
        }*/
        ArrayList<String> allDataFileName = FileUtils.getAllDataFileName(path);
        for (String s : allDataFileName) {
            System.out.println(".onCreate s="+s);
        }


        //val path1 =Environment.getExternalStorageDirectory().toString() + "/MIUI/sound_recorder/call_rec"
        //println("MainActivity.onCreate path1="+path1)


    }
}